import request from "@/utils/request";

/**提交订单 */
export function submitOrder(data: any) {
  return request({
    url: "/userOrder/submitOrder",
    method: "post",
    data: data,
  });
}

/**订单列表 */
export function getOrderList(data: any) {
  return request({
    url: "/userOrder/list",
    method: "get",
    params: data,
  });
}

/**待支付订单列表 */
export function getWatPayOrderList(data: any) {
  return request({
    url: "/userOrder/watPayList",
    method: "get",
    params: data,
  });
}

/**配送中订单列表 */
export function getDeliveryOrderList(data: any) {
  return request({
    url: "/userOrder/deliveryList",
    method: "get",
    params: data,
  });
}

/**待评价订单列表 */
export function getEvaluateOrderList(data: any) {
  return request({
    url: "/userOrder/evaluateList",
    method: "get",
    params: data,
  });
}

/**已取消订单列表 */
export function getCancelOrderList(data: any) {
  return request({
    url: "/userOrder/cancelList",
    method: "get",
    params: data,
  });
}

//订单操作

export function cancelOrder(data: any) {
  return request({
    url: "/userOrder/cancel",
    method: "delete",
    params: data,
  });
}
